﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Salon
{
    public class Car
    {
        public int Id { get; set; }
        public int Mark { get; set; }
        public int Type { get; set; }
        public int Color { get; set; }
        public int Year { get; set; }
        public float Cost { get; set; }
        public float Price { get; set; }
        public int Salon { get; set; }
        public float Discount { get; set; }

        public override bool Equals(object obj)
        {
            Car car = obj as Car;
            if (car == null)
                return false;

            if (this.Id.Equals(car.Id))
                return true;

            return false;
        }

        public override int GetHashCode()
        {
            return Id.GetHashCode();
        }
    }
}
